
import VueRouter from 'vue-router'

// 导入包
import HomeContainer from './components/tabber/HomeContainer.vue'
import MemberContainer from './components/tabber/MemberContainer.vue'
import SearchContainer from './components/tabber/SearchContainer.vue'
import ShopCartContainer from './components/tabber/ShopCartContainer.vue'

import newlist from './components/news/newList.vue'
import newsinfo from './components/news/newsinfo.vue'

import photo from './components/photo/photolist.vue'
import  photoinfo from './components/photo/photoinfo.vue'

import goodslist from './components/goods/goodslist.vue'
import goodsinfo from './components/goods/goodsinfo.vue'
import goodsdesc from './components/goods/goodsDesc.vue'
import goodscomment from './components/goods/goodsComment.vue'


var router = new VueRouter({
    routes:[//路由规则
        {path:'/',redirect:'/home'},
        {path:'/home', component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/search',component:SearchContainer},
        {path:'/shopCart',component:ShopCartContainer},

        {path:'/home/newlist',component:newlist},
        {path:'/home/newsinfo/:id',component:newsinfo },

        {path:'/home/photo',component:photo},
        {path:'/home/photoinfo/:id',component:photoinfo},

        {path:'/home/goodslist',component:goodslist},
        {path:'/home/goodsinfo/:id',component:goodsinfo,name:'goodsinfo'},
        {path:'/home/goodsdesc/:id',component:goodsdesc,name:'goodsdesc'},
        {path:'/home/goodscomment/:id',component:goodscomment,name:'goodscomment'}

    ],
    linkActiveClass:'mui-active'
});

export default router